<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>编辑器</title>
    <script type="text/javascript" src="../../assets/libs/jquery/jquery.min.js"></script>
    <script type="text/javascript" src='js/tinymce.min.js'></script>
    <script type="text/javascript">
        tinymce.init({
            selector: '#editor',
            height: 580,
            language: 'zh_CN',
            images_reuse_filename:true,
            images_upload_url:'/api/mediaFile/upload',
            images_upload_credentials: true,
            plugins: [
                'advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker',
                'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking',
                'save table directionality emoticons template powerpaste imagetools quickbars'
            ],
            quickbars_insert_toolbar: 'quickimage quicktable',
            image_uploadtab: true,
            font_formats: '宋体=宋体,SimSun,sans-serif;新宋体=新宋体,NSimSun,sans-serif;微软雅黑=微软雅黑,Microsoft YaHei;Andale Mono=andale mono,times; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Book Antiqua=book antiqua,palatino; Comic Sans MS=comic sans ms,sans-serif; Courier New=courier new,courier; Georgia=georgia,palatino; Helvetica=helvetica; Impact=impact,chicago; Symbol=symbol; Tahoma=tahoma,arial,helvetica,sans-serif; Terminal=terminal,monaco; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Webdings=webdings; Wingdings=wingdings,zapf dingbats',
            toolbar: 'insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons'
        });
        function getContent(){
            return tinymce.get("editor").getContent();
        }
        function setContent(value){
            tinymce.get("editor").setContent(value);
        }
    </script>
    <style>
        #editor{
            width: 99%;
            height: 400px;
        }
    </style>
</head>
<body>
<textarea id="editor"></textarea>
</body>
</html>